Add watermark amp; proportional thumbnail amp; fixed height amp; fixed width class in PHP
PHP adds watermark proportional thumbnails fixed height fixed width class.When using foreach loop processing, you need to set a time for sleep or follow the returned value after processing. Otherwise, the processing will not end.Download: http://pan.baidu.com/s/1ntKAfFF
// File name: image_process.class.php
Class Image_process {
Public $ source; // source image
PHP add watermark scale thumbnail fixed height fixed width class.When using the Foreach Loop, sleep is required to set a time or follow the returned value after processing, otherwise the processing is not complete.Download: Http://pan.baidu.com/s/1ntKAfFF
File name: image_process.class.php
Class image_process{
public $source;//Original
Public $source _width;//Wide
Public $source _height;//High
Public $source _type_id;
Public $orign _name;
PHP add watermark scale thumbnail fixed height fixed width class.
Class image_process{
Public $source; Original
Public $source _width; Original width
Public $source _height; Original height
Public $source _type_id;
Public $orign _name;
Public $orign _dirname;
Incoming original path
Public function __construct ($source) {
$this->typelist = Array (1=> ' gif ',2=> ' jpg ',3=> ' png ');
$ginfo
# Include
# Include # Include
# Include Using namespace std;
Const int iAntCount = 34; // Number of antsConst int iCityCount = 51; // number of citiesConst int iItCount = 2000; // The maximum number of times of downgradingConst double q= 100;Const double alpha = 1;Const double beta = 5;Const double rou = 0.5;
Int besttour [iCityCount]; // The list of most available paths
Double rnd (int low, double uper) // obtain a random number{Double p = (rand ()/(double) RAND_MAX) * (uper)-(low) + (low );R
JSON is a more convenient data in the form of specific you can refer to http://baike.baidu.com/view/136475.htm is quite detailed.
Today, I wrote a JSON object using JQuery and used the $. getJSON method to obtain JSON data and parse it easily.
From http://api.flickr.com/services/feeds/photos_public.gne? Tags = cat tagmode = any format = json jsoncallback =? This address obtains JSON data, analyzes the structure, and generates images and related links:
JS:
$ (Function (){
Var url = "htt
JSON is a convenient form of data, the following using the $.getjson method, to achieve the JSON data and parsing, are very convenient and simple
jquery file
The code is as follows
Copy Code
$ (function () {var url= "/photos_public.gne?tags=cattagmode=anyformat=jsonjsoncallback=?"Using the Getjson method to get JSON data$.getjson (UrlProcessing data to refer to the returned JSON datafunction (data) {Generate title and header connectionsvar tit= "$ ("H1"). html (tit);
= SELECT_ZXING_PICTURE) {Logger. v (TAG, "return back from media store. "); if (resultCode = RESULT_ OK) {try {Uri dataUri = data. getData (); Logger. v (TAG, "open input stream from data which its URI is>" + dataUri. toString (); InputStream istream = getContentResolver (). openInputStream (dataUri); if (zxingBitmap! = Null) {Logger. v (TAG, "zxing bitmap is not null, begin to recycle it. "); zxingBitmap. recycle ();} else {Logger. v (TAG, "zxing bitmap is null. ");} Logger. v (TAG, "decode st
implemented by the beam Java SDK for the user score of this batch task is as follows:gameEvents [... input ...] [... parse ...] .apply("ExtractUserScore", new ExtractAndSumScore("user")) [... output ...];Extractandsumscore implements the logic described in "what", that is, grouping by user, then accumulating fractions, with the relevant code as follows:gameInfo .apply(MapElements .via((GameActionInfo gInfo) -> KV.of(gInfo.getKey(field)
directory within the directory and print" "Info= {} forRoot, objinchListdir (dir_data): Dir_obj='%s/%s'%(root, obj)ifOs.path.isfile (dir_obj):#file Processing " "info is a dictionary format, convenient to return calls, this script is only output content, does not involve returning calls" "info['timecreated'] = Os.path.getctime (dir_obj)#Get creation Timeinfo['timemodified'] = Os.path.getatime (dir_obj)#Get access Timeinfo['Size'] = Os.path.getsize (dir_obj)/1024/1024#gets the fil
CODE,VFWEBQQ, T is time stamp, directly with System.currenttimemillis () to get it good.The JSON data returned is as follows:{"Retcode": 0, "result": {"stats": [{"Client_type": $, "UIn": 2368295990, "stat": Ten}], "Minfo": [{"Nick": "Scumvirus" , "Province": "Hubei", "gender": "Male", "UIn": 2741681712, "Country": "China", "City": "Wuhan"},{"Nick": "Scumvirus", "Province": " Hubei "," gender ":" Male "," UIn ": 570904041," Country ":" China "," City ":" Wuhan "},{" Nick ":" No Game no Bot "," P
Contact Us
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.